import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/tabbar/Home.vue'

import GoodsList from '../views/buy_goods/goodsList.vue'
import GoodsDetail from '../views/buy_goods/goodsDetail.vue'
import ShopCar from '../views/buy_goods/shopCar.vue'

import Imglist from '../views/imgshare/Imglist.vue'
import Imginfo from '../views/imgshare/Imginfo.vue'
import NewList from '../views/news/Newlist.vue'
import Detail from '../views/news/Detail.vue'
import Desc from '../views/news/Desc.vue'
import Contact from '../views/contact/Contact.vue'
import Search from '../views/tabbar/Search.vue'
import Addgoods from '../views/addgood/Addgood.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/home',
        component: Home
    },
    {
        path: '/newslist',
        component: NewList,
    },
    {
        path: '/news/detail/:id',
        component: Detail
    },
    {
        path: '/goodsdesc/:id',
        component: Desc,
    },
    {
        path: '/contact',
        component: Contact
    },
    {
        path: '/search',
        component: Search
    },
    {
        path: '/addgoods',
        component: Addgoods
    },
    {
        path: '/photo/list',
        component: Imglist
    },
    {
        path: '/photo/Info/:id',
        component: Imginfo
    },
    {
      path: '/goods/list',
      component: GoodsList
    },
    {
      path: '/goods/detail/:id',
      component: GoodsDetail
    },
    {
      path: '/shopcar',
      component: ShopCar
    }
]

const router = new VueRouter({
    routes
})

export default router